package adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import java.util.List;
/**
 * Created by Administrator on 2016/4/25.
 * 为游戏界面的所有文字的网格设置适配器
 */
public class GameAdapter extends BaseAdapter {

    private Context ctx;
    private List<View> values;
    public GameAdapter(Context ctx, List<View> values) {
        this.ctx = ctx;
        this.values = values;
    }

    @Override
    public int getCount() {
        return values.size();
    }

    @Override
    public Object getItem(int position) {
        return values.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        return values.get(position);
    }
}
